<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@page contentType="text/html;charset=UTF-8"
	import="com.srit.forecast.constant.Constant"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="srit-tag" uri="/srit-constant-tag"%>
<srit-tag:Constant var="PAGE_TYPE_FORM" />
<srit-tag:Constant var="PAGE_TYPE_LIST" />
<srit-tag:Constant var="PAGE_TYPE_ALL" />
<html>
<head>
<title></title>
<link href="<c:url value="/resources/css/style.css" />" rel="stylesheet"
	type="text/css">
<link href="<c:url value="/resources/css/list_css.css" />"
	rel="stylesheet" type="text/css">
<link href="<c:url value="/resources/css/autocomplete.css" />"
	rel="stylesheet" type="text/css">
<script src="<c:url value="/resources/js/jquery-1.8.0.min.js" />"></script>
</head>
<!-- 搜索 -->
<c:if test="${pageType==PAGE_TYPE_ALL}">
	<div id="SearchDiv"></div>
</c:if>

<!-- 列表页 -->
<c:if test="${pageType==PAGE_TYPE_LIST||pageType==PAGE_TYPE_ALL}">
	<div id="pageDiv">
		<div>
			<a href="<c:url  value="/event-form"></c:url>">创建</a>
		</div>
		<table class="sritTable listTable" align='center' id="table"
			width="98%" style="margin-top: 5px">
			<tr>
				<th><input type="checkbox" /></th>
				<th>EVENTID</th>
				<th>EVENTKEY</th>
				<th>EVENTTARGET</th>
				<th>EVENTDESC</th>
				<th>EVENTACTIONCODES</th>
				<th>操作</th>
			</tr>
			<c:forEach var="bean" items="${page.list}">
				<tr onMouseOver="javascript:this.style.backgroundColor='#AABBFF';"
					onMouseOut="javascript:this.style.backgroundColor='#FFFFFF';"
					ondblclick="javascript:window.location='<c:url  value="/event-edit">
					<c:param name="id" value="${bean.eventId}"/>
					</c:url>'">
					<td><input type="checkbox" value="${bean.eventId }" /></td>
					<td>${bean.eventId }</td>
					<td>${bean.eventKey }</td>
					<td>${bean.eventTarget }</td>
					<td>${bean.eventDesc }</td>
					<td>${bean.eventActionCodes }</td>
					<td></td>
				</tr>
			</c:forEach>
		</table>

		<table class="sritTable" align='center' id="table" width="98%"
			style="margin-top: 0px">
			<tr>
				<td class="td_tl">${page.count},${page.pageNum}</td>
			</tr>
		</table>
	</div>
</c:if>

<!-- 表单页 -->
<c:if test="${pageType==PAGE_TYPE_FORM||pageType==PAGE_TYPE_ALL}">
	<div id="createDiv">
		<table class="menu-pare" align='center' width="98%"
			style="text-align: right">
			<tr>
				<td><a href="<c:url  value="/event-search"></c:url>">返回</a></td>
			</tr>
		</table>

		<form:form modelAttribute="event" action="/event-saveOrUpdate"
			method="post" enctype="multipart/form-data">
			<form:hidden path="eventId" />
			<table class="sritTable" align='center' id="table" width="98%">
				<tr>
					<th colspan="4">event Config</th>
				</tr>
				<tr>
					<td class="td_tl">eventKey</td>
					<td><form:input path="eventKey" /></td>
					<td class="td_tl">eventDesc</td>
					<td><form:input path="eventDesc" /></td>
				</tr>
				<tr>
					<td class="td_tl">eventTarget</td>
					<td><form:input path="eventTarget" /></td>
					<td class="td_tl">eventActionCodes</td>
					<td><form:input path="eventActionCodes" /></td>
				</tr>
				<tr>
					<td colspan="4" class="td_tl"><c:if
							test="${event.eventId==null}">
							<input type="submit" value="保存" />
						</c:if> <c:if test="${event.eventId!=null }">
							<input type="submit" value="修改" />
						</c:if> <input type="reset" /></td>
				</tr>
			</table>
		</form:form>


		<form:form action="/event-saveTest">
			<input type="text" name="event.eventDesc" />
			<input type="text" name="test.list[0].name" />
			<input type="text" name="test.list[1].name" />
			<input type="submit" value="保存" />
		</form:form>

		<script>
			
		</script>

	</div>
</c:if>


</html>




